<?php

namespace App\Admin\Controllers;


use App\Http\Controllers\Controller;
use App\Models\AfterSales;
use Illuminate\Http\Request;
/**
 * 此项目由百凯伦公司研发，后面省略一万字
 */
class ApproveController extends Controller
{
    //审核通过
    public function store(Request $request)
    {
        $id = $request->id ?? 0;
        $aftersales = new AfterSales();
        $row = $aftersales->where('id', $id)->first();
        $row->status = 1;
        $data = ['code' => 0, 'msg' => "审核失败", 'data' => []];
        if ($row->save()) {
            $data = [
                'code' => 1,
                'msg' => "审核通过",
                'data' => []
            ];
        }
        return response()->json($data);
    }
}
